package com.mask.chapter01;

public class A {
	public static void main(String[] args) {
		int a[] = { 1, 3, 5, 7, 9, 11 };
		int sum = 0;
		try{
			for (int i = 0; i <= 6; i++){
				sum = sum + a[i];
			}
			System.out.println("sum=" + sum);
		}catch (ArrayIndexOutOfBoundsException e)           {
			System.out.println("数组越界");
		}
	}
}
